package org.example.design.One;

import lombok.SneakyThrows;

/**
 * @Auther:Liu
 * @Testname:DemoB
 * @Date:2025/8/15 9:43
 */
//单例懒加载不加锁
public class DemoB {
    private static DemoB instance;

    private DemoB() {
    }

    @SneakyThrows
    public  static DemoB getInstance() {
        if (instance == null) {
            instance = new DemoB();
        }
        return instance;
    }
}
